import React from 'react';
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import AppLayout from './components/Layout';
import Strategy from './pages/Strategy';
import StockData from './pages/StockData';
import Optimization from './pages/Optimization';
import StrategyCombination from './pages/StrategyCombination';
// import StockInfo from './pages/StockInfo';
import './App.css';
import { HomeOutlined, LineChartOutlined, ExperimentOutlined, MenuFoldOutlined, MenuUnfoldOutlined, DatabaseOutlined, TeamOutlined } from '@ant-design/icons';

function App() {
  const menuItems = [
    {
      key: '/',
      icon: <LineChartOutlined />,
      label: '策略回测',
    },
    {
      key: '/strategy-combination',
      icon: <TeamOutlined />,
      label: '策略组合',
    },
    {
      key: '/stock-data',
      icon: <DatabaseOutlined />,
      label: '股票数据',
    },
    {
      key: '/optimization',
      icon: <ExperimentOutlined />,
      label: '参数优化',
    },
  ];

  return (
    <ConfigProvider 
      locale={zhCN}
      modal={{
        maskClosable: true
      }}
    >
      <Router>
        <AppLayout>
          <Routes>
            <Route path="/" element={<Strategy />} />
            <Route path="/strategy-combination" element={<StrategyCombination />} />
            <Route path="/stock-data" element={<StockData />} />
            <Route path="/optimization" element={<Optimization />} />
            {/* <Route path="/stock-info" element={<StockInfo />} /> */}
            <Route path="*" element={<Navigate to="/" />} />
          </Routes>
        </AppLayout>
      </Router>
    </ConfigProvider>
  );
}

export default App;
